using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerAirState : State
{
    public PlayerAirState(Player _player, string _Animname, StateMachine _stateMachine) : base(_player, _Animname, _stateMachine)
    {
    }

    public override void Enter()
    {
        base.Enter();
    }

    public override void Exit()
    {
        base.Exit();
    }

    public override void Update()
    {
        base.Update();
        xInput = Settings.inputActions.PlayerInputAction.MoveBinding.ReadValue<Vector2>().x;
        Player.SetVelocity(xInput, rb.velocity.y);

        if (Player.isGroundDetected())
        {
            StateMachine.ChangeState(Player.IdleState);
        }
    }
}
